#pragma once

template< class TInterface, class TInterfaceVtbl >
class CComObject
{
protected:
	TInterface* pDispatch;
	TInterfaceVtbl* pDispatchVtbl;
public:
	CComObject(CJoinPoint& joinPoint)
	{
		pDispatch = reinterpret_cast<TInterface*>(joinPoint.GetObject());
		pDispatchVtbl = reinterpret_cast<TInterfaceVtbl*>(joinPoint.GetVTLB());
	}
	virtual ~CComObject()
	{
	}
};

